//统一管理首页模块的接口
import requset from "@/utils/request"
import type { HospitalResponseData,HospitalLevelAndRegionResponseData } from "./type"
enum API{
    //获取已有的医院的数据接口地址
    HOSPITAL_URL='/hosp/hospital/',
    //获取医院的等级与地区接口
    HOSPITAL_LEVEL_AND_REGION_URL='/cmn/dict/findByDictCode/'
}

//获取医院的数据
export const reqHospital=(page:number,limit:number)=>requset.get<any,HospitalResponseData>(API.HOSPITAL_URL+`${page}/${limit}`)

export const reqHospitalLevelAndRegion=(dictCode:string)=>requset.get<any,HospitalLevelAndRegionResponseData>(API.HOSPITAL_LEVEL_AND_REGION_URL+`${dictCode}`)